package com.joysuch.wwyt.common.enums;

/**
 * 统计模板库
 *
 * @Author ZhangDong
 * @Date 2020/7/23 15:28
 */
public enum CommonStaticsModuleTypes {
    EDU_RELEASE(1, "考试发布数量统计"),
    EDU_PASS(2, "考试合格率统计"),
    TRAIN_RELEASE(3, "培训发布统计"),
    COURSE_RATE(4, "课程占比统计"),
    INSPECT_EXCEPTION(5, "巡检异常统计"),
    INSPECT_TODAY_FINISH(6, "巡检今日完成率统计"),
    INSPECT_TODAY_EXCEPTION(7, "巡检今日异常率统计"),
    INSPECT_FINISH(8, "巡检完成率统计"),
    INSPECT_USER(9, "巡检人员统计"),
    CERT_FINISH(10, "作业完成时效统计"),
    CERT_TODAY(11, "今日作业统计"),
    CERT_APPLY(12, "作业申请单位统计"),
    CERT_RECENT_30(13, "作业最近30天作业数量"),
    CERT_RISK(14, "作业风险统计"),
    CERT_AREA(15, "作业区域统计"),
    CERT_AUDIT_PASS(16, "作业审批通过率统计"),
    CERT_CHECK_PASS(17, "作业验收合格率统计"),
    INSPECT_EXCEPTION_ROUTE(18,"巡检异常巡检路线统计"),
    INSPECT_EXCEPTION_POINT(19,"巡检异常检查点统计"),
    EDU_EXAM_JOIN(20,"考试参与率统计"),
    RISK_AREA_COUNT(21,"风险分区区域数量占比"),
    RISK_POINT_COUNT(22,"风险分区风险点数量占比");


    private Integer index;
    private String module;

    CommonStaticsModuleTypes(Integer index, String module) {
        this.index = index;
        this.module = module;
    }

    public Integer getIndex() {
        return this.index;
    }

    public static String getModule(Integer index) {
        CommonStaticsModuleTypes[] values = CommonStaticsModuleTypes.values();
        for (CommonStaticsModuleTypes value : values) {
            if (value.index.equals(index)) {
                return value.module;
            }
        }
        return null;
    }
}
